﻿@{
    Layout = null;
}
@model ElingOA6_Admin_DSJCJ.Model.OnePrjOneDiscus
<!DOCTYPE html>
<html>
<head>
<base target="_self" />
@Html.Partial("LoadPanelPartial")
   @if (false)
   {
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
   }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>

    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)


    <script type="text/javascript">

        $(document).ready(function () {
            var hdjsAlert = $("#hidMessage").val();
            var hdjsAlert2 = $("#hidIsClose").val();
            if (hdjsAlert != "") {
                alert(hdjsAlert);
                if (hdjsAlert2 == "Y") {
                    window.returnValue = 'SUCCESS';
                    window.close();
                }
            }
        });


        function ok() {
            if (uploaddoc.GetText() == "") {
                alert("请选择要上传的文件！");
            } else {
                form1.submit();
            } 
        }

         function cancel() {
             window.close();
          }
    </script>
</head>
<body>
@using (Html.BeginForm("Save", "OnePrjOneDiscus", FormMethod.Post, new { id = "form1", @class = "tableForm" }))
{
        <table class="tableForm" align = "center" width="100%">
        <tr><td align="center" colspan="2"><h2>一事一议项目申请发布</h2></td></tr>
         <tr>
            <th>项目名称:</th>
            <td class="tdClass">
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbFTitle";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(96);
                   settings.Text = Model.FTitle;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
         </tr>
         <tr>
            <th>所属乡镇:</th>
            <td class="tdClass">
                 @Html.DevExpress().ComboBox(settings =>
            {
                settings.Name = "tbFDeptNo";
                settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                settings.Enabled = true;
                settings.Properties.TextField = "Text";
                settings.Properties.ValueField = "Value";
            }).BindList(ViewData["Dept"] as List<SelectListItem>).Bind(Model.FDeptNo).GetHtml()
            </td>
         </tr>
         <tr>
            <th>项目所属年度:</th>
            <td class="tdClass">
                 @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "tbFYear";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
               }).BindList(ViewData["year"]).Bind(Model.FYear).GetHtml()

            </td>
         </tr>
         <tr>
            <th>备注:</th>
            <td class="tdClass">
                @Html.DevExpress().Memo(settings =>
               {
                   settings.Name = "tbFNote";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(80);
                   settings.Text = Model.FNote;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
                   settings.Properties.Rows = 5;
               }).GetHtml()
            </td>
         </tr>
         <tr>
            <th>是否欠发达村:</th>
            <td class="tdClass">
                @Html.DevExpress().RadioButtonList(settings =>
                {
                    settings.Name = "tbFisPoor";
                    settings.Properties.RepeatLayout = System.Web.UI.WebControls.RepeatLayout.Table;
                    settings.Properties.RepeatDirection = System.Web.UI.WebControls.RepeatDirection.Horizontal;
                    settings.Properties.RepeatColumns = 2;
                }).BindList(new List<SelectListItem> { 
                            new SelectListItem { Text = "是", Value = "Y"}, 
                            new SelectListItem { Text = "否", Value = "N" } 
                        }).Bind(Model.FisPoor).GetHtml()
            </td>
         </tr>
           <tr>
            <th>一事一议项目建设申请表:</th>
            <td class="tdClass">
                @Html.DevExpress().UploadControl(
                    settings =>
                    {
                        settings.Name = "uploaddoc";
                        settings.BrowseButton.Text = "浏览";
                        settings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
                        settings.ClearFileSelectionImage.ToolTip = "清除选择";
                    }).GetHtml()
            </td>
           </tr>
           <tr>
           <th>发布时间:</th>
            <td class="tdClass">@Html.DevExpress().Label(
                settings => 
                {
                    settings.Text = DateTime.Now.ToString("yyyy-MM-dd");
                }

            ).GetHtml()</td>
           </tr> 
            <tr>
             <th></th>                        
            <td>
                @Html.DevExpress().Button(settings =>
            {
                settings.Name = "btnOK";
                settings.Text = "发布";
                settings.ControlStyle.CssClass = "button";
                settings.Images.Image.Url = Url.Content("~/Content/ControlImages/ok.png");
                settings.ClientSideEvents.Click = "ok";
            }).GetHtml()
                @Html.DevExpress().Button(settings =>
            {
                settings.Name = "btnCancel";
                settings.Text = "取消";
                settings.ControlStyle.CssClass = "button";
                settings.Images.Image.Url = Url.Content("~/Content/ControlImages/no.png");
                settings.CausesValidation = false;
                settings.ClientSideEvents.Click = "cancel";

            }).GetHtml()
            </td>
        </tr>
        </table>
    @Html.Hidden("hidMessage", ViewData["message"])
    @Html.Hidden("hidIsClose", ViewData["IsClose"])
    @Html.Hidden("hidid", ViewData["id"])

    @Html.Hidden("hdtype", ViewData["type"])
}    

</body>
</html>
